package de.koller.gravity.input;

import de.koller.aframe.plain.InputPlain;
import de.koller.gravity.GNode;
import java.awt.event.KeyEvent;

public class GInput extends GNode {
	private InputPlain input;

	@Override
	protected void init() {
		super.init();
		
		input = new InputPlain( groot.display );
		this.addChild( input );
	}

	@Override
	protected void update( int elapsedTime ) {
		super.update( elapsedTime );
		
		if( input.isKeyPressed( KeyEvent.VK_F12 ) )
			groot.stop();
		if( input.isKeyPressed( KeyEvent.VK_R ) )
			groot.render.renderQuality = true;
		if( input.isKeyPressed( KeyEvent.VK_S ) )
			groot.render.renderQualitySequence = true;
	}
}
